package com.tencreat.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.Getter;

@Getter
public enum OrderStatus {
    /**
     * 订单状态枚举
     */
    PAY(102,"待付款"),//待支付
    WAIT_DELIVER(103,"待发货"),
    DEL_PAY(104,"取消支付"),
    DAI_CENTXT(105,"待评价"),
    WAIT_RECEIVED(106,"待收货"),
    OK(107,"完成"),
    AFTERSALE_OK(108,"售后完成"),//退货
    WAIT_USE(109,"待使用"),
    PAID(110,"已支付"),;

    OrderStatus(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    @EnumValue
    private final int value;
    @JsonValue
    private final String desc;

    /**
     * 单个枚举的展示
     */
    @Override
    public String toString() {
        return value + "-" + desc;
    }
}
